#pragma once
#include <QWidget>
#include <QBoxLayout>

class QWebEngineView;
class QNetworkAccessManager;
class QNetworkReply;
class QLineEdit;
class WebEngineWidget : public QWidget
{
    QWebEngineView* _webEngine;

    QNetworkAccessManager* manager = nullptr;
    QNetworkReply* pReply;

    QLineEdit* codeEdit;
    QString chandlerToken;
public:
    explicit WebEngineWidget(QWidget *par = nullptr);
    ~WebEngineWidget();
public slots:
    void requestFinished(QNetworkReply* reply);
private:
    QBoxLayout* webBrowserLayout();
    QBoxLayout* interfaceRequest();
    QBoxLayout* chandlerRequest();

    void parseToken(const QByteArray& dataArry);
};

//dragon service
//rabbitMQ message
//

